package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc SetDutyCycleTargetDto
 * @使用场景
 */
@Data
public class SetDutyCycleTargetDto extends BaseDto implements Serializable {

    /**
     * 被评对象目标周期ID
     */
    @ApiModelProperty("被评对象目标周期ID")
    private String evaObjTargetCycleId;

    /**
     * 目标周期名称
     */
    @ApiModelProperty("目标周期名称")
    private String targetCycleName;

    /**
     * 目标周期简称
     */
    @ApiModelProperty("目标周期简称")
    private String cyclelAlias;

    /**
     * 周期ID
     */
    @ApiModelProperty("周期ID")
    private String cycleId;

    /**
     * 是否父周期 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否父周期")
    private String isParentCycle;

    /**
     * 是否中期 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否中期")
    private String isMetaphase;

    /**
     * 周期名称
     */
    @ApiModelProperty("周期名称")
    private String cycleStandardName;

    /**
     * 冗余预算单位
     */
    @ApiModelProperty("冗余预算单位")
    private String cycleBudgetUnit;

    /**
     * 周期预算金额
     */
    @ApiModelProperty("周期预算金额")
    private Double cycleBudgetAmount;

    /**
     * 诊断值
     */
    @ApiModelProperty("诊断值")
    private Double targetDiagnosticValue;

    /**
     * 冗余单位
     */
    @ApiModelProperty("冗余单位")
    private String unit;

    /**
     * 被评对象目标设置ID
     */
    @ApiModelProperty("被评对象目标设置ID")
    private String evaObjOsetId;

    /**
     * 目标值
     */
    @ApiModelProperty("目标值")
    private Double targetValue;

    /**
     * 冗余指标业务类型 NUMBER_GROWTH:数量增长型 NUMBER_DECLINE:数量降幅型 PERCENTAGE_GROWTH:百分比增长型 PERCENTAGE_DECLINE:百分比降幅型 PROGRESS:进度型 RATIO_GROWTH:比率增长型 RATIO_DECLINE:比率降幅型 SUBJECTIVE_QUALITATIVE:主观定性
     */
    @ApiModelProperty("冗余指标业务类型")
    private String targetValueType;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        SetDutyCycleTargetDto that = (SetDutyCycleTargetDto) o;
        return (
                evaObjTargetCycleId == that.evaObjTargetCycleId &&
                        targetCycleName == that.targetCycleName &&
                        cyclelAlias == that.cyclelAlias &&
                        cycleId == that.cycleId &&
                        isParentCycle == that.isParentCycle &&
                        isMetaphase == that.isMetaphase &&
                        cycleStandardName == that.cycleStandardName &&
                        cycleBudgetUnit == that.cycleBudgetUnit &&
                        cycleBudgetAmount == that.cycleBudgetAmount &&
                        targetDiagnosticValue == that.targetDiagnosticValue &&
                        unit == that.unit &&
                        evaObjOsetId == that.evaObjOsetId &&
                        targetValue == that.targetValue &&
                        targetValueType == that.targetValueType
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                evaObjTargetCycleId,
                targetCycleName,
                cyclelAlias,
                cycleId,
                isParentCycle,
                isMetaphase,
                cycleStandardName,
                cycleBudgetUnit,
                cycleBudgetAmount,
                targetDiagnosticValue,
                unit,
                evaObjOsetId,
                targetValue,
                targetValueType
        );
    }

}
